package com.lagou.service;

import com.lagou.tool.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "lagou-service-code",path = "/api")
public interface CodeServcieFeign {

    @RequestMapping("/code/validate/{email}/{code}")
    String validateCode(@PathVariable("email")String email, @PathVariable("code")String code);

    @RequestMapping("/lagou-token/saveToken/{token}/{email}")
    CommonResponse saveToken(@PathVariable("token")String token, @PathVariable("email")String email);

    @RequestMapping("/lagou-token/getEmail/{token}")
    String getEmailByToken(@PathVariable("token") String token);
}
